package com.iafme.dto.res;

import cn.zhxu.bs.bean.DbField;
import cn.zhxu.bs.bean.SearchBean;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.iafme.dto.res.common.CommonFieldResDTO;
import com.systemframework.jackson.CustomDecimalSerialize;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * @author summer
 * @version 1.0
 * @date 2025/3/24 21:24
 */
@EqualsAndHashCode(callSuper = true)
@Data
@SearchBean(tables = "iafme_certificate n LEFT JOIN iafme_project p ON n.projectID=p.id",orderBy = "n.createTime DESC")
public class CertificateResDTO extends CommonFieldResDTO {

    @DbField("n.projectId")
    private Integer projectId;

    @DbField("p.name")
    private String projectName;

    @DbField("n.amount")
    @JsonSerialize(using = CustomDecimalSerialize.class)
    private BigDecimal amount;

    @DbField("n.name")
    private String name;
}
